home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
ums
/
listclient3_1.lha
/
UMSInitStem.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1994-08-06
|
5KB
|
166 lines
/* ------------------------------------------------------------------------
:Program. UMSInitStem.rexx
:Contents. constant definitions and initialisations for ums.library
:Author. Martin Horneffer
:History. v1.0 [mh] 26-Sep-93
:History. v1.1 [hG] 22-Jan-94 added default parameter parsing,
:History. incl. of RexxDosSupport.library etc.
:Hsitory. v1.2 [hG] 11-Jul-94 clear RC after GetVar()
:History. v1.3 [hG] 18-ul-94 uses rexxdossupport.library 2.2
:Version. $VER: UMSInit 1.3 (18.7.94)
:Copyright. Freely Distributable
:Language. ARexx
------------------------------------------------------------------------ */
FALSE = 0
TRUE = 1
/* enumeration of fields in an UMS-message */
UMSCODE. = ""
UMSCODE_MsgText = 0
UMSCODE_FromName = 1
UMSCODE_FromAddr = 2
UMSCODE_ToName = 3
UMSCODE_ToAddr = 4
UMSCODE_MsgID = 5
UMSCODE_CreationDate = 6
UMSCODE_ReceiveDate = 7
UMSCODE_RefID = 8
UMSCODE_Group = 9
UMSCODE_Subject = 10
UMSCODE_Attributes = 11
UMSCODE_Comments = 12
UMSCODE_Organization = 13
UMSCODE_Distribution = 14
UMSCODE_Folder = 15
UMSCODE_FidoID = 16
UMSCODE_MausID = 17
UMSCODE_ReplyGroup = 18
UMSCODE_ReplyName = 19
UMSCODE_ReplyAddr = 20
UMSCODE_FidoText = 32
UMSCODE_ErrorText = 33
UMSCODE_Newsreader = 34
UMSNUMFIELDS = 128
/* user status-bits */
UMSUSTAT. = ""
UMSUSTAT.Archive = 4 /* msg should be archived, don't delete */
UMSUSTAT.Junk = 5 /* negative selection, inheritance suggested */
UMSUSTAT.PostPoned = 6 /* to be read again, (but not now) */
UMSUSTAT.Selected = 7 /* positive selection, inheritance suggested */
UMSUSTAT.Old = 8 /* user has already read this Message */
UMSUSTAT.Read = Old
UMSUSTAT.WriteAccess = 9 /* user may change or delete this message */
UMSUSTAT.ReadAccess = 10 /* user may read this message */
UMSUSTAT.ViewAccess = 11 /* user may read the header of this message */
UMSUSTAT.Owner = 12 /* user 'owns' (wrote) this message */
UMSUFLAGS_Protected = '00001E00'x /* WriteAccess, ReadAccess, ViewAccess, Owner */
/* global status-bits */
UMSGSTAT. = ""
UMSGSTAT.Deleted = 0 /* msg is really deleted */
UMSGSTAT.Expired = 1 /* msg has expired and may be deleted */
UMSGSTAT.Exported = 2 /* msg has been exported */
UMSGSTAT.Orphan = 3 /* msg could not be exported */
UMSGSTAT.Link = 4 /* within a ring of linked msgs */
UMSGSTAT.HardLink = 5 /* link is hardLink */
UMSGFLAGS_Protected = '0000003D'x /* Deleted, Exported, Orphan, Link, HardLink */
/* Errors */
UMSERR. = ""
UMSERR.ok = 0
UMSERR.unknown = 1
UMSERR.codeMissing = 100
UMSERR.forbiddenCode = 101
UMSERR.noWriteAccess = 102
UMSERR.noReader = 103
UMSERR.noExporter = 104
UMSERR.badLink = 105
UMSERR.noWork = 106
UMSERR.noSysop = 107
UMSERR.badChange = 108
UMSERR.dupe = 200
UMSERR.noReadAccess = 201
UMSERR.noViewAccess = 202
UMSERR.msgCorrupted = 203
UMSERR.noHdrSpace = 204
UMSERR.noSuchMsg = 205
UMSERR.badName = 206
UMSERR.badTag = 207
UMSERR.missingTag = 208
UMSERR.noSuchUser = 209
UMSERR.notFound = 210
UMSERR.autoBounce = 211
UMSERR.msgDeleted = 212
UMSERR.noNetAccess = 213
UMSERR.badPattern = 214
UMSERR.badVarname = 215
UMSERR.fsFull = 216
UMSERR.noMsgMem = 217
UMSERR.missingIndex = 218
UMSERR.serverTerminated = 300
UMSERR.cantWrite = 301
UMSERR.cantRead = 302
UMSERR.wrongMsgPtr = 303
UMSERR.serverNotFree = 304
UMSERR.idCountProb = 305
UMSERR.noLogin = 306
UMSERR.wrongServer = 307
UMSERR.noMem = 308
/*** Startup ***/
options results
RC = 0
signal on BREAK_C
signal on BREAK_D
signal on BREAK_E
signal on BREAK_F
signal on ERROR
signal on HALT
signal on IOERR
signal on SYNTAX
/*** Open ums.library ***/
/* result is ignored since AddLib() does not check whether the lib
* exists but only whether the name is already in the list
*/
call addlib('ums.library', 0, -210, 8)
call addlib('rexxdossupport.library', 0, -30, 2)
/* get default values, parse arguments */
if symbol("server") ~= "VAR" then server = GetVar('UMSServer')
if symbol("name") ~= "VAR" then name = GetVar('username')
if (rc = 0) & (symbol("password") ~= "VAR") then password = GetVar('UMS/passwd/'name)
RC = 0 /* don't care about missing ENV-Variables */
parse arg arguments
if strip(arguments) = '?' then do
address command 'echo noline "' ArgsTemplate ': "'
pull arguments
end; else nop
if ~ ReadArgs(arguments,ArgsTemplate) then do
say Fault(RC,ProgramName)
exit 10
end; else nop
drop arguments
/* Login is not done here to give the the chance to overwrite
* the arguments/env-vars during test phase of skripts.
*/